
const clearEmpty = (str: string) => {
  if (!str?.includes(" ")) return str;
  if (!str?.trim()) {
    clearEmpty(str);
    return str
  };
  let nStr = "";
  for (let i = 0; i < str.length; i++) {
    if (str[i] !== " ") {
      nStr += str[i];
    }
  }
  return nStr;
}
export default clearEmpty;